import xml.etree.ElementTree as ET

# 解析 XML 数据
xml_data = '''
<China>
  <!-- 此处为原 XML 内容 -->
</China>
'''
root = ET.fromstring(xml_data)

# 遍历所有县级节点
for province in root.findall('province'):
    for city in province.findall('city'):
        for county in city.findall('county'):
            name = county.get('name')
            weather_code = county.get('weatherCode')
            print(f"城市名：{name}，天气代码：{weather_code}")